﻿using AutoMapper;
using crip.Dtos;
using crip.Models;

namespace crip.Profiles
{
    public class AreaProfile:Profile
    {
       public AreaProfile()
        {
            CreateMap<Area, AreaDto>().ForMember(
                dest => dest.IsApproved,
                opt => {
                    opt.MapFrom(src => src.IsApproved ? "已审核":"未审核" );
                }
                );

            CreateMap<Area, AreaSimplifyDto>();
        }
    }
}
